package com.example.test.加载bean的方式.方式三;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;

/**
 * @author 晓果冻
 * @version 1.0
 * @date 2022/4/13 21:07
 */
@Configuration
//@ComponentScan
//@Import(User.class)
public class BeanConfig {
    @Bean
    public User user(){
        return new User();
    }
}
